import plotly.express as px
import pandas
df = px.data.gapminder()
df2007 = df.query("year == 2007")
print(df2007.head())
fig = px.scatter(df2007,
                 x="gdpPercap",
                 y="lifeExp",
                 color="continent",
                 title="A Plotly Express Figure",
                 size='pop',
                 size_max= 60
                 )
fig = px.scatter(df2007,
                 x="gdpPercap",
                 y="lifeExp",
                 color="continent",
                 title="A Plotly Express Figure",
                 size='pop',
                 size_max= 60,
                 facet_col='continent',
                 log_x=True
                 )
fig = px.scatter(df,
                 x="gdpPercap",
                 y="lifeExp",
                 color="continent",
                 title="A Plotly Express Figure",
                 size='pop',
                 size_max= 60,
                 # facet_col='continent',
                 log_x=True,
                 animation_frame='year',
                 animation_group='country',
                 # range_x=[100,10000],
                 range_y=[25,90]
                 )

fig.show()

import plotly.express as px

df = px.data.iris()

fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", title="A Plotly Express Figure")
# If you print the figure, you'll see that it's just a regular figure with data and layout
# print(fig)

fig.show()